import request from '@/utils/request'

// 查询游戏记录列表
export function listRecords(query) {
  return request({
    url: '/system/records/list',
    method: 'get',
    params: query
  })
}

// 查询游戏记录详细
export function getRecords(id) {
  return request({
    url: '/system/records/' + id,
    method: 'get'
  })
}

// 新增游戏记录
export function addRecords(data) {
  return request({
    url: '/system/records',
    method: 'post',
    data: data
  })
}

// 修改游戏记录
export function updateRecords(data) {
  return request({
    url: '/system/records',
    method: 'put',
    data: data
  })
}

// 删除游戏记录
export function delRecords(id) {
  return request({
    url: '/system/records/' + id,
    method: 'delete'
  })
}

export function endRecords(data){
  return request({
    url: '/system/records/end',
    method: 'post',
    data: data
  })
}

export function updateVipAndRecords(data){
  return request({
    url: '/system/records/checkout',
    method: 'post',
    data: data
  })
}
